package com.laf.mall.api.repository;

import com.laf.mall.api.dto.ParkingRule;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author ygl
 * @create 2018-12-27
 * @DESCRIPTION
 **/
@Repository
@Slf4j
public class ParkingRuleRepository {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    /**
     * 列表查询
     * @return
     */
    public List<ParkingRule> findList(){
        String sql = "SELECT * FROM t_parking_rule";
        List<ParkingRule> list = jdbcTemplate.query(sql,new ParkingRule());
        return list;
    }

}

